package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

/*
类简介：

功能：

时间：2020/4/6

*/
public interface OrderDao {


    int addOrder(Order order);

    int isExit(Order order);

    Map<String, Object> findById(int id);

    List<Map<String, Object>> getReport();

    Integer getOrderNumberBetweenAnyDate(@Param("start") LocalDateTime start,@Param("end") LocalDateTime end);

    Integer getVisitsNumberBetweenAnyDate(@Param("start") LocalDateTime start,@Param("end") LocalDateTime end);

    List<Map<String,Object>> getHotSetmeal();

    Page<Map<String,String>> findPageWithDate(@Param("start") String start, @Param("end")String end, @Param("orderType")String orderType, @Param("visitedStatus")String visitedStatus,@Param("queryString") String queryString);

    Page<Map<String,String>> findPageWithoutDate(@Param("orderType")String orderType, @Param("visitedStatus")String visitedStatus,@Param("queryString") String queryString);

    Map<String, Object> findByIdForEdit(int id);

    List<Integer> findSetmealByOrderId(@Param("id")int id, @Param("memberId")Object member_id, @Param("orderDate")Object orderDate);

    Order getDeleteOrderInfo(Integer id);

    int deleteById(Integer id);

    int editVisitedStatus(@Param("id")int id,@Param("visitedStatus")String visitedStatus);

    List<String> getDays(LocalDateTime start);

    List<String> getOrderCount(LocalDateTime start);

    List<String> getVisitedCount(LocalDateTime start);

    List<Map<String,String>> getIncomeReport();
}
